﻿// 选择部门
function selDepartment() {
    var url = "/department/organization";
    var departmentID = $("#parentID").val();
    if (departmentID != '') {
        url = "/department/organization?departmentID=" + departmentID;
    }
    OpenChildPop({
        id: 'selDepartment',
        page: url,
        title: '选择组织架构',
        width: 500,
        height: 350
    });
}

function check() {
    var name = $("#Name").val();
    var parentDepartmentID = $("#ParentID").val();
    var sortOrder = $("#SortOrder").val();

    if (parentDepartmentID == "") {
        alert("请选择上级部门!");
        return false;
    }
    if ($.trim(name) == "") {
        alert('名称不能为空!');
        return false;
    }
    if (sortOrder == "") {
        alert("请填写排序值!");
        return false;
    }
    return true;
}